﻿using System;
using System.Data;
using Infragistics.Win.UltraWinGrid;
using Titan.FIS.UI;

namespace Titan.FIS.LmsBalanceCollect
{
    public class Common
    {
        /// <summary>
        /// 当前登录用户信息
        /// </summary>
        public static WinFormSys.Entity.UserInfoEntity UserInfo { set; get; }

        /// <summary>
        /// 信息显示控件，用于重量采集显示
        /// </summary>
        public static System.Windows.Forms.RichTextBox MsgBox { set; get; }

        /// <summary>
        /// 显示控件
        /// </summary>
        public static Infragistics.Win.UltraWinGrid.UltraGrid GridMain { set; get; }

        /// <summary>
        /// 显示控件表
        /// </summary>
        public static System.Data.DataTable DataTable { set; get; }

    }

    /// <summary>
    /// com参数设置
    /// </summary>
    public class ComConfig
    {
        public string Name = "COM3";
        public int BaudRate = 9600;
        public int DataBits = 7;
        public System.IO.Ports.StopBits StopBits = System.IO.Ports.StopBits.One;
        public System.IO.Ports.Parity Parity = System.IO.Ports.Parity.None;
    }

    public class TimerConfig
    {
        public int iTime = 0;
        public int iRow = 0;
        public int iCell = 0;
        public System.Windows.Forms.Timer timer;
    }

    /// <summary>
    /// 数据传输模式
    /// </summary>
    public enum DataMode
    {
        Text,
        Hex
    }

    public class DataGirdViewInfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string Describe { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string First { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Second { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Third { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Four { get; set; }
    }

}
